<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>DIDIFight</title>
<#include "common/header.ftl"/>
    <script type="text/javascript" src="/js/plugins/jquery.form.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-validation/jquery.validate.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery.twbsPagination.min.js"></script>

    <script type="text/javascript">
        $(function () {
            $(function () {
                //点击查询按钮
                $("#query").click(function () {
                    window.location.reload();
                });
                //点击新增按钮
                $("#addMenuBtn").click(function () {
                    $("#editForm").clearForm(true);
                    $("#menuModal").modal("show");
                });
                //点击保存按钮
                $("#saveBtn").click(function () {
                    $("#editForm").ajaxSubmit({
                        datatype: "json",
                        success: function (data) {
                            if (data.success) {
                                $("#currentPage").val(1);
                                $("#searchForm").submit();
                            } else {
                                $.messager.popup(data.msg);
                            }
                        }
                    })
                });
            });
        });
    </script>
</head>

<body>
<div class="container">
<#include "common/top.ftl"/>
    <div class="row">
        <div class="col-sm-3">
        <#assign currentMenu = "hire" />
        <#include "common/menu.ftl" />
        </div>
        <div class="col-sm-9">
            <div class="page-header">
                <center>
                    <h3>打手信息</h3>
                </center>
            </div>
            <div class="row">
                <!-- 提交分页的表单 -->
                <form id="searchForm" class="form-inline" method="post" action="/hire">
                    <input type="hidden" name="currentPage" id="currentPage" value=""/>
                    <div class="form-group">
                        <button id="query" type="button" class="btn btn-success"><i class="icon-search"></i> 查询</button>
                    </div>
                </form>
            </div>
            <div class="row">
                <table class="table">
                    <thead>
                    <tr>
                        <th>姓名</th>
                        <th>等级</th>
                        <th>联系方式</th>
                    </tr>
                    </thead>
                    <tbody>
                    <#list data as vo>
                    <tr>
                        <td>${(vo.name)!''}</td>
                        <td>${(vo.levelDisplay)!''}</td>
                        <td>${(vo.tel)!''}</td>
                    </tr>
                    </#list>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<#--<div id="menuModal" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">增加</h4>
            </div>
            <div class="modal-body">
                <form id="editForm" class="form-horizontal" method="post" action="/add"
                      style="margin: -3px 118px">
                    <input id="menuId" type="hidden" name="id" value=""/>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">姓名</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="name" name="name" placeholder="NAME">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">等级</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="level" name="level" placeholder="KEY">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">联系电话</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="tel" name="tel" placeholder="TYPE">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a href="javascript:void(0);" class="btn btn-success" id="saveBtn" aria-hidden="true">保存</a>
                <a href="javascript:void(0);" class="btn" data-dismiss="modal" aria-hidden="true">关闭</a>
            </div>
        </div>
    </div>
</div>-->
</body>
</html>